<template>
	<view>

	</view>
</template>

<script>
	var _this;
	export default {
		data() {
			return {

			}
		},
		onLoad() {
			_this = this;
			// 允许从相机和相册扫码
			uni.scanCode({
				success: function(res) {
					_this.checkCode(res.result)
				}
			});
		},
		methods: {
			checkCode: function(code) {
				let sendData = {
					userID: _this.$Common.USERINFO.fldGuid,
					Code: code,
					Flag:1
				};
				console.log(JSON.stringify(sendData));
				_this.$http.get('CheckCode',sendData).then(res => {
					console.log(res)
				}).catch(err => {
					console.log(err)
					_this.$Common.showErrorFun(err);
				})
			}
		}
	}
</script>

<style>

</style>
